<template>
  <div class="card">
    <div class="card-title">
      <div v-if="title">{{ title }}</div>
      <div class="tips">{{ tips }}</div>
    </div>
    <div class="card-container" :class="{ flexContent }"><slot /></div>
  </div>
</template>
  
  <script>
export default {
  name: "Card",
  props: {
    title: String,
    tips: String,
    flexContent: Boolean,
  },
  computed: {},
};
</script>
  
<style lang="scss" scoped>
.card {
  background: #ffffff;
  border: 1px solid #e6e8f0;
  border-radius: 4px;
  padding: 20px 20px;
  margin: 10px 0;
  .tips {
    color: #838588;
    flex: 1;
    font-size: 12px;
    max-width: 50%;
    text-align: right;
  }
  &-title {
    font-size: 18px;
    font-weight: 600;
    color: #222222;
    line-height: 25px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    justify-items: flex-start;
    align-items: center;
  }
  .flexContent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
  }
}
</style>
  